﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common
{
    public static class ExtensionMethods
    {
        public static int ToNumber(this string value)
        {
            int tempInt = 0;

            if (string.IsNullOrEmpty(value)) return tempInt;

            if (!int.TryParse(value, out tempInt))
            {
                tempInt = 0;
            }
            return tempInt;
        }
    }
}
